%==========================================================================
%=  This file is part of the Sound Restoration Project
%=  (c) Copyright Industrial Mathematics Institute
%=                University of South Carolina, Department of Mathematics
%=  ALL RIGHTS RESERVED
%=
%=  Author: Borislav Karaivanov
%==========================================================================

%==========================================================================
% List of the files on which this procedure depends:
%
% none
%
%==========================================================================

%==========================================================================
% The function "playSound" plays a specified audio (.wav) file.
% REMARK: The user have no controls for the audio. Just have to wait until
% it is done.
% INPUT: "audioFileName" is a string specifying an audio file to be played.
% OUTPUT: None.
%==========================================================================
function playSound(audioFileName)
%playSound('C:\E\NEHScans\NEH044\DPX\NEH044_SndBounds247-416_Im0-2565_SndOverlaps_Amp0.4_Delay21.wav');

% Read in the audio file.
[audioArr, samplingRate] = wavread(audioFileName);
% Create an audio player object.
audioPlayer = audioplayer(audioArr, samplingRate);
pause on
pause(5);
% Play the audio.
play(audioPlayer);

% end of the function "playSound"
